
#!/bin/bash

# 批量安装 vscode 插件; 前提是已经安装 vscode;

# 添加 VS Code 的 bin 目录到 PATH
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"

# 插件列表
extensions=(
    "alefragnani.bookmarks"
    "alibaba-cloud.tongyi-lingma"
    "alphabotsec.vscode-eclipse-keybindings"
    "anseki.vscode-color"
    "caofanghui.cao-template"
    "caofanghui.cpt-carry"
    "caofanghui.snippetonline"
    "dbaeumer.vscode-eslint"
    "eamodio.gitlens"
    "esbenp.prettier-vscode"
    "formulahendry.auto-close-tag"
    "formulahendry.auto-rename-tag"
    "ms-ceintl.vscode-language-pack-zh-hans"
    "octref.vetur"
    "svelte.svelte-vscode"
    "techer.open-in-browser"
)

# 安装所有插件
for ext in "${extensions[@]}"; do
    echo "正在安装: $ext"
    code --install-extension "$ext" --force
done

echo "所有插件安装完成！"